package com.coincalf.wallet.mapper;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.coincalf.wallet.entity.CoinWithdraw;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 当用户发起提币的时候,吧数据插入到该表 Mapper 接口
 * </p>
 *
 * @author crow
 * @since 2018-05-16
 */
public interface CoinWithdrawMapper extends BaseMapper<CoinWithdraw> {

    List<CoinWithdraw> selectOutRecharges(Pagination pagination,
                                          @Param("agencyUserId") long agencyUserId,
                                          @Param("userName") String userName,
                                          @Param("orderId") long orderId,
                                          @Param("status") Integer status,
                                          @Param("coinId") long coinId,
                                          @Param("parentId") long parentId,
                                          @Param("createTime") String createTime);


    Map<String, Object> selectOutRechargesTotal(@Param("agencyUserId") long agencyUserId);

    int updateTxidById(@Param("id") long id, @Param("txid") String txid);

    int updateStatusById(@Param("id") long id, @Param("status") int status, @Param("remark") String remark);

    public int updateTxStatusById(@Param("id") Long id, @Param("txStatus") Integer txStatus);
}
